1. For combined scores less than 50, the grade is ”Fail”.

Grades 10 30 
Expected Result Fail
Actual Result Fail

2. For exam scores less than 40, the grade is ”Component Fail” (no matter what the practical score is)

Grades 10 60
Expected Result component fail
Actual Result Fail


3. For practical scores less than 40, the grade is ”Component Fail” (no matter what the exam score is)

Grades 50 20
Expected Result component fail
Actual Result fail


4. For combined scores between 50 and 80 inclusive, the grade is ”Pass”.

Grades 40 40
Expected Result pass
Actual Result fail


5. For combined scores between 80 and 100 inclusive, the grade is ”Pass with distinction”.

Grades 100 100
Expected Result pass with distinction
Actual Result System accepts inputs and bring user to next input line without output



6. For all other inputs, the program should report ”Invalid Input”.

Grades 120 120
Expected Result Invalid Input
Actual Result  System accepts inputs and bring user to next input line


